﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp6
{
    class Program
    {
        static void Main(string[] args)
        {
            Alk alk = new Alk("张三","埃洛克","是一个边境的勇士",70,80,30,120);
            alk.Saa();
            alk.Jn();
            Console.WriteLine();
            Tl tl = new Tl("李四","泰拉","是一个复仇的勇者",65,50,55,1.78);
            tl.Saa();
            tl.Jn();
            Console.WriteLine();
            Lks lks = new Lks("赵五", "卢卡斯", "是一名彬彬有礼的剑客", 85, 45, 55, 80);
            lks.Saa();
            lks.Jn();
            Console.WriteLine();
            Lf lf = new Lf("金六", "洛菲", "是一个攻击迅猛的时空旅行者", 90, 30, 65, 1.58);
            lf.Saa();
            lf.Jn();
            Console.WriteLine();
            Console.ReadKey();
        }
    }
    class Lf : Hero
    {
        private double height;
        public double Height
        {
            get { return this.height; }
            set { this.height = value; }
        }
        public Lf(string nickname, string heroname, string heroinfo, int atk, int defense, int speed, double height)
            : base(nickname, heroname, heroinfo, atk, defense, speed)
        {
            this.Height = height;
        }
        public void Saa()
        {
            base.Hello();
            Console.WriteLine("我的身高是：" + this.height + "米");
        }
        public void Jn()
        {
            Console.WriteLine("我拥有三个技能，它们分别是：能量精灵、暗影传送、时空迸裂。");
        }

    }
    class Lks : Hero
    {
        private int weight;
        public int Weight
        {
            get { return this.weight; }
            set { this.weight = value; }
        }
        public Lks(string nickname, string heroname, string heroinfo, int atk, int defense, int speed, int weight)
            : base(nickname, heroname, heroinfo, atk, defense, speed)
        {
            this.Weight = weight;
        }
        public void Saa()
        {
            base.Hello();
            Console.WriteLine("我的体重是：" + this.weight + "KG");
        }
        public void Jn()
        {
            Console.WriteLine("我拥有三个技能，它们分别是：减速陷阱、能量浪潮、旋风剑舞。");
        }

    }
    class Tl:Hero 
    {
        private double height;
        public double Height
        {
            get { return this.height; }
            set { this.height = value; }
        }
        public Tl(string nickname, string heroname, string heroinfo, int atk, int defense, int speed, double height)
            : base(nickname, heroname, heroinfo, atk, defense, speed)
        {
            this.Height = height;
        }
        public void Saa()
        {
            base.Hello();
            Console.WriteLine("我的身高是：" + this.height + "米");
        }
        public void Jn()
        {
            Console.WriteLine("我拥有三个技能，它们分别是：巨浪冲击、元素突击、复仇杀戮。");
        }

    }
    class Alk:Hero 
    {
        private int weight;
        public int Weight 
        {
            get { return this.weight; }
            set { this.weight = value; }
        }
        public Alk(string nickname, string heroname, string heroinfo, int atk, int defense, int speed, int weight)
            :base(nickname, heroname, heroinfo, atk, defense, speed)
        {
            this.Weight = weight; 
        }
        public void Saa() 
        {
            base.Hello();
            Console.WriteLine("我的体重是："+this.weight+"KG");
        }
        public void Jn() 
        {
            Console.WriteLine("我拥有三个技能，它们分别是：碎石打击、烈焰锚钩、战斗咆哮。");
        }

    }
    class Hero
    {//父类：昵称  英雄姓名  英雄介绍  攻击力  防御力  速度
        private string nickname;
        private string heroname;
        private string heroinfo;
        private int atk;
        private int defense;
        private int speed;

        public string Nickname
        {
            get { return this.nickname; }
            set { this.nickname = value; }
        }
        public string Heroname
        {
            get { return this.heroname; }
            set { this.heroname = value; }
        }
        public string Heroinfo
        {
            get { return this.heroinfo; }
            set { this.heroinfo = value; }
        }
        public int Atk
        {
            get { return this.atk; }
            set { this.atk = value; }
        }
        public int Defense
        {
            get { return this.defense; }
            set { this.defense = value; }
        }
        public int Speed
        {
            get { return this.speed; }
            set { this.speed = value; }
        }
        public Hero() { }

        public Hero(string nickname, string heroname, string heroinfo, int atk, int defense, int speed)
        {
            this.Nickname = nickname;
            this.Heroname = heroname;
            this.Heroinfo = heroinfo;
            this.Atk = atk;
            this.Defense = defense;
            this.Speed = speed;
        }

        public void Hello()
        {
            Console.WriteLine("昵称：{0},英雄姓名：{1},英雄介绍：{2},攻击力：{3},防御力：{4},速度：{5}", this.Nickname, this.Heroname, this.Heroinfo, this.Atk, this.Defense, this.Speed);
        }      
    }
}
